home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin MDIForm frmMDI
- Caption = "DSG VB-SCRIPT PAD"
- ClientHeight = 5415
- ClientLeft = 2190
- ClientTop = 2025
- ClientWidth = 7050
- Height = 6105
- Left = 2130
- LinkTopic = "MDIForm1"
- Top = 1395
- Width = 7170
- Begin PictureBox picToolbar
- Align = 1 'Align Top
- BackColor = &H8000000F&
- Height = 375
- Left = 0
- ScaleHeight = 345
- ScaleWidth = 7020
- TabIndex = 0
- Top = 0
- Width = 7050
- Begin CommonDialog CMDialog1
- CancelError = -1 'True
- Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
- Left = 5280
- Top = 240
- End
- Begin Image imgPasteButtonUp
- Height = 330
- Left = 5280
- Top = 0
- Visible = 0 'False
- Width = 375
- End
- Begin Image imgPasteButtonDn
- Height = 330
- Left = 4920
- Top = 0
- Visible = 0 'False
- Width = 375
- End
- Begin Image imgCopyButtonDn
- Height = 330
- Left = 4200
- Top = 0
- Visible = 0 'False
- Width = 375
- End
- Begin Image imgCopyButtonUp
- Height = 330
- Left = 4560
- Top = 0
- Visible = 0 'False
- Width = 375
- End
- Begin Image imgCutButtonDn
- Height = 330
- Left = 3840
- Top = 0
- Visible = 0 'False
- Width = 375
- End
- Begin Image imgCutButtonUp
- Height = 330
- Left = 3480
- Top = 0
- Visible = 0 'False
- Width = 375
- End
- Begin Image imgFileOpenButtonDn
- Height = 330
- Left = 2760
- Top = 0
- Visible = 0 'False
- Width = 360
- End
- Begin Image imgFileOpenButtonUp
- Height = 330
- Left = 3120
- Top = 0
- Visible = 0 'False
- Width = 360
- End
- Begin Image imgFileNewButtonUp
- Height = 330
- Left = 2400
- Top = 0
- Visible = 0 'False
- Width = 360
- End
- Begin Image imgFileNewButtonDn
- Height = 330
- Left = 2040
- Top = 0
- Visible = 0 'False
- Width = 375
- End
- Begin Image imgPasteButton
- Height = 330
- Left = 1560
- Top = 0
- Width = 375
- End
- Begin Image imgCopyButton
- Height = 330
- Left = 1200
- Top = 0
- Width = 375
- End
- Begin Image imgCutButton
- Height = 330
- Left = 840
- Top = 0
- Width = 375
- End
- Begin Image imgFileOpenButton
- Height = 330
- Left = 360
- Top = 0
- Width = 360
- End
- Begin Image imgFileNewButton
- Height = 330
- Left = 0
- Top = 0
- Width = 360
- End
- End
- Begin Menu mnuFile
- Caption = "&File"
- Begin Menu mnuFNew
- Caption = "&New"
- End
- Begin Menu mnuFOpen
- Caption = "&Open"
- End
- Begin Menu mnuFExit
- Caption = "E&xit"
- End
- Begin Menu mnuRecentFile
- Caption = "-"
- Index = 0
- Visible = 0 'False
- End
- Begin Menu mnuRecentFile
- Caption = "RecentFile1"
- Index = 1
- Visible = 0 'False
- End
- Begin Menu mnuRecentFile
- Caption = "RecentFile2"
- Index = 2
- Visible = 0 'False
- End
- Begin Menu mnuRecentFile
- Caption = "RecentFile3"
- Index = 3
- Visible = 0 'False
- End
- Begin Menu mnuRecentFile
- Caption = "RecentFile4"
- Index = 4
- Visible = 0 'False
- End
- End
- Begin Menu mnuOptions
- Caption = "&Options"
- Begin Menu mnuOToolbar
- Caption = "&Toolbar"
- End
- End
- Sub imgCopyButton_Click ()
- imgCopyButton.Refresh
- EditCopyProc
- End Sub
- Sub imgCopyButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgCopyButton.Picture = imgCopyButtonDn.Picture
- End Sub
- Sub imgCopyButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- ' If the button is pressed, display the up bitmap if the
- ' mouse is dragged outside the button's area, otherwise
- ' display the up bitmap
- Select Case Button
- Case 1
- If X <= 0 Or X > imgCopyButton.Width Or Y < 0 Or Y > imgCopyButton.Height Then
- imgCopyButton.Picture = imgCopyButtonUp.Picture
- Else
- imgCopyButton.Picture = imgCopyButtonDn.Picture
- End If
- End Select
- End Sub
- Sub imgCopyButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgCopyButton.Picture = imgCopyButtonUp.Picture
- End Sub
- Sub imgCutButton_Click ()
- imgCutButton.Refresh
- EditCutProc
- End Sub
- Sub imgCutButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgCutButton.Picture = imgCutButtonDn.Picture
- End Sub
- Sub imgCutButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- ' If the button is pressed, display the up bitmap if the
- ' mouse is dragged outside the button's area, otherwise
- ' display the up bitmap
- Select Case Button
- Case 1
- If X <= 0 Or X > imgCutButton.Width Or Y < 0 Or Y > imgCutButton.Height Then
- imgCutButton.Picture = imgCutButtonUp.Picture
- Else
- imgCutButton.Picture = imgCutButtonDn.Picture
- End If
- End Select
- End Sub
- Sub imgCutButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgCutButton.Picture = imgCutButtonUp.Picture
- End Sub
- Sub imgFileNewButton_Click ()
- imgFileNewButton.Refresh
- FileNew
- End Sub
- Sub imgFileNewButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgFileNewButton.Picture = imgFileNewButtonDn.Picture
- End Sub
- Sub imgFileNewButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- ' If the button is pressed, display the up bitmap if the
- ' mouse is dragged outside the button's area, otherwise
- ' display the up bitmap
- Select Case Button
- Case 1
- If X <= 0 Or X > imgFileNewButton.Width Or Y < 0 Or Y > imgFileNewButton.Height Then
- imgFileNewButton.Picture = imgFileNewButtonUp.Picture
- Else
- imgFileNewButton.Picture = imgFileNewButtonDn.Picture
- End If
- End Select
- End Sub
- Sub imgFileNewButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgFileNewButton.Picture = imgFileNewButtonUp.Picture
- End Sub
- Sub imgFileOpenButton_Click ()
- imgFileOpenButton.Refresh
- FOpenProc
- End Sub
- Sub imgFileOpenButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgFileOpenButton.Picture = imgFileOpenButtonDn.Picture
- End Sub
- Sub imgFileOpenButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- ' If the button is pressed, display the up bitmap if the
- ' mouse is dragged outside the button's area, otherwise
- ' display the up bitmap
- Select Case Button
- Case 1
- If X <= 0 Or X > imgFileOpenButton.Width Or Y < 0 Or Y > imgFileOpenButton.Height Then
- imgFileOpenButton.Picture = imgFileOpenButtonUp.Picture
- Else
- imgFileOpenButton.Picture = imgFileOpenButtonDn.Picture
- End If
- End Select
- End Sub
- Sub imgFileOpenButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgFileOpenButton.Picture = imgFileOpenButtonUp.Picture
- End Sub
- Sub imgPasteButton_Click ()
- imgPasteButton.Refresh
- EditPasteProc
- End Sub
- Sub imgPasteButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgPasteButton.Picture = imgPasteButtonDn.Picture
- End Sub
- Sub imgPasteButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- ' If the button is pressed, display the up bitmap if the
- ' mouse is dragged outside the button's area, otherwise
- ' display the up bitmap
- Select Case Button
- Case 1
- If X <= 0 Or X > imgPasteButton.Width Or Y < 0 Or Y > imgPasteButton.Height Then
- imgPasteButton.Picture = imgPasteButtonUp.Picture
- Else
- imgPasteButton.Picture = imgPasteButtonDn.Picture
- End If
- End Select
- End Sub
- Sub imgPasteButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
- imgPasteButton.Picture = imgPasteButtonUp.Picture
- End Sub
- Sub MDIForm_Load ()
- ' Application starts here (Load event of Startup form).
- Show
- ' Always set working directory to directory containing the application.
- ChDir App.Path
- 'Initialize document form arrays, and show first document.
- ReDim Document(1)
- ReDim FState(1)
- Document(1).Tag = 1
- FState(1).Dirty = False
- Document(1).Show
- ' Read MDINOTE.INI and set recent file menu items appropriately
- GetRecentFiles
- End Sub
- Sub MDIForm_Unload (Cancel As Integer)
- ' If the Unload was not canceled (in the QueryUnload events for the Notepad forms)
- ' there will be no document windows left, so go ahead and end the application.
- If Not AnyPadsLeft() Then
- End
- End If
- End Sub
- Sub mnuFExit_Click ()
- End
- End Sub
- Sub mnuFNew_Click ()
- FileNew
- End Sub
- Sub mnuFOpen_Click ()
- FOpenProc
- End Sub
- Sub mnuOptions_Click ()
- mnuOToolbar.Checked = frmMDI!picToolbar.Visible
- End Sub
- Sub mnuOToolbar_Click ()
- OptionsToolbarProc Me
- End Sub
- Sub mnuRecentFile_Click (index As Integer)
- OpenFile (mnuRecentFile(index).Caption)
- ' Update recent files list.
- GetRecentFiles
- End Sub
-